package com.mh.controller;

import com.mh.dto.R;
import com.mh.pojo.TypeInfos;
import com.mh.service.TypeInfosService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Date:2024/10/20
 * author:zmh
 * description: 商品类型相关接口
 **/

@RestController
@RequestMapping("typeInfos")
@CrossOrigin
@Slf4j
@RequiredArgsConstructor
public class TypeInfosController {

    private final TypeInfosService typeInfosService;

    /**
     * 获取热门商品类型
     * @return 返回执行结果
     */
    @GetMapping("/getHotTypeData")
    public R<List<TypeInfos>> getHotTypeData() {
        return typeInfosService.getHotTypeData();
    }
}








